package com.shibida.shibidaProject.userInfo.dao;

import com.shibida.shibidaProject.userInfo.domain.TagVO;
import com.shibida.shibidaProject.userInfo.domain.UserVO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TagRepository extends JpaRepository<TagVO, Integer> {
//    通过id获取tag
    @Query(value = "select tag_name from t_tag where id=:id", nativeQuery = true)
    String getTagBy(int id);
    @Query(value = "select id from t_tag where tag_name=:tagStr", nativeQuery = true)
    String getTagStr(String tagStr);
}
